﻿using System.Collections.Generic;
using System.Windows;
using CommonControlLibrary;
using DevExpress.Xpf.Core;
using QueryResource.Common;

namespace DevControlLibrary
{
    public class DesignWindow : IDesignWindow
    {
        private RibbonMainWindow _window;
        #region IDesignWindow 成员
        public ISplash GetSplash { get; set; }

        public System.Windows.Window GetMainWindow()
        {
            MessageBoxHelper.Show = msg => DXMessageBox.Show(msg, string.Empty);
            MessageBoxHelper.ShowCaption = (msg, caption) => DXMessageBox.Show(msg, caption);
            MessageBoxHelper.ShowMessage = (msg,caption, btns, imgs) => DXMessageBox.Show(msg, caption, btns, imgs);  


            _window = new RibbonMainWindow(GetSplash);
            return _window;
        }

        public void CreateResourceDictionary(out IEnumerable<ResourceDictionary> resourceList)
        {
            resourceList = new ResourceDictionary[] {};
        }

        public void SaveDocumentContent()
        {
            if (_window != null)
                _window.SaveDocumentContent();
        }
        #endregion
    }
}
